package com.jxc.action;

import java.io.IOException;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;

import com.jxc.util.SerialUtils;

/**
 * 专门生成单号的ACTION
 * 
 * @author Tino
 * 
 */
@Namespace("/")
@Action("serial")
public class SerialAction extends BaseAction {
	private String sign;

	public void noAuth_serial() throws IOException{
		ServletActionContext.getResponse().setContentType("text/html;charset=utf-8");
		ServletActionContext.getResponse().getWriter().write(SerialUtils.serial(sign));
		ServletActionContext.getResponse().getWriter().flush();
		ServletActionContext.getResponse().getWriter().close();
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

}
